<?php
/**
 * PsiFramework
 *
 * Php Simple Framework
 *
 * PHP version 5.3
 *
 * @category  PsiFramework.Plugins.Shop.Classes.Model
 * @package   PsiFramework.Plugins.Shop.Classes.Model
 * @author    Remi San <remi.san@gmail.com>
 * @copyright 2011 Remi San
 * @license   http://creativecommons.org/licenses/by/3.0/  Creative Commons CC BY 3.0
 * @version   SVN: <svn_id>
 * @link      http://www.psiframework.com/phpdoc/classes/db_\PsiFramework\Plugins\Shop\Classes\Model\OrderItemLinkTax.html
 */

namespace PsiFramework\Plugins\Shop\Classes\Model;

import("Classes.Model.Object");
import("Classes.Util.Parameters.ObjectParameters");

use \PsiFramework\Classes\Model\Object;
use \PsiFramework\Classes\Util\Parameters\ObjectParameters;
use \PsiFramework\Plugins\Shop\Classes\Model\Tax;

/**
 * The OrderItemLinkTax Object
 *
 * This is the class for the OrderItemLinkTax Object
 *
 * @category PsiFramework.Plugins.Shop.Classes.Model
 * @package  PsiFramework.Plugins.Shop.Classes.Model
 * @author   Remi San <remi.san@gmail.com>
 * @license  http://creativecommons.org/licenses/by/3.0/  Creative Commons CC BY 3.0
 * @link     http://www.psiframework.com/phpdoc/classes/db_\PsiFramework\Plugins\Shop\Classes\Model\OrderItemLinkTax.html
 */
class OrderItemLinkTax extends Object
{
    
    /**
     * @var OrderItemLink
     */
    protected /*OrderItemLink*/ $_link ;
    
    /**
     * @var Tax
     */
    protected /*Tax*/           $_tax ;
    
    /**
     * @var int
     */
    protected /*int*/           $_order ;
    
    /**
     * @var double
     */
    protected /*double*/         $_value ;
    
    /**
     * @var double
     */
    protected /*double*/         $_total ;
    
    /**
     * Constructor
     * 
     * @param OrderItemLink $link  The item
     * @param Tax           $tax   The tax
     * @param int           $order The order
     * @param double        $value The value
     * @param double        $total The total
     * 
     * @return OrderItemLinkTax
     */
    public function __construct(
        /*OrderItemLink*/ $link=null,
        /*Tax*/           $tax=null,
        /*int*/           $order=null,
        /*double*/        $value=null,
        /*double*/        $total=null
    )
    {
        $this->_link = $link;
        $this->_tax = $tax;
        $this->_order = $order;
        $this->_value = $value;
        $this->_total = $total;
    }

    /**
     * Getter for the id / primary key
     *
     * @see Object::getId()
     *
     * @return array
     */
    public function getId()
    {
        if (is_null($this->_link) && is_null($this->_tax)) {
        	return null ;
        } else {
        	$id = array();
        	if (!is_null($this->_link)) {
        		$id["link"] = $this->_link ;
        	}
        	if (!is_null($this->_tax)) {
        		$id["tax"] = $this->_tax ;
        	}
        	return $id ;
        }
    }

    /**
     * Getter for the link
     *
     * @return OrderItemLink
     */
    public function getLink()
    {
    	return $this->_link ;
    }
    
    /**
     * Setter for the link
     *
     * @param OrderItemLink $link The link
     *
     * @return void
     */
    public function setLink(/*OrderItemLink*/ $link)
    {
    	$this->_link = $link ;
    }
    
    /**
     * Getter for the tax
     *
     * @return Tax
     */
    public function getTax()
    {
    	return $this->_tax ;
    }
    
    /**
     * Setter for the tax
     *
     * @param Tax $tax The tax
     *
     * @return void
     */
    public function setTax(/*Tax*/ $tax)
    {
    	$this->_tax = $tax ;
    }
    
    /**
     * Getter for the order
     *
     * @return int
     */
    public function getOrder()
    {
    	return $this->_order ;
    }
    
    /**
     * Setter for the order
     *
     * @param int $order The order
     *
     * @return void
     */
    public function setOrder(/*int*/ $order)
    {
    	$this->_order = $order ;
    }
    
    /**
     * Getter for the value
     *
     * @return double
     */
    public function getValue()
    {
    	return $this->_value ;
    }
    
    /**
     * Setter for the value
     *
     * @param double $value The value
     *
     * @return void
     */
    public function setValue(/*double*/ $value)
    {
    	$this->_value = $value ;
    }
    
    /**
     * Getter for the total
     *
     * @return double
     */
    public function getTotal()
    {
    	return $this->_total ;
    }
    
    /**
     * Setter for the total
     *
     * @param double $total The total
     *
     * @return void
     */
    public function setTotal(/*double*/ $total)
    {
    	$this->_total = $total ;
    }
    
    /**
     * Shows the OrderItemLink as a string
     *
     * @see Object::toString()
     *
     * @return string
     */
    public function toString()
    {
        return '' ;
    }

}
